<!DOCTYPE html>
<html>
<head>
    <title>While Statement Example 1</title>
    <script type="text/javascript">
        var i = 0;
        while (i < 10) {
           i += 2;
        }

        alert(i);
        
    </script>

</head>
<body>
  
</body>
</html>